import { Field, InputType } from '@nestjs/graphql';
import { EmrDocTypeEntity } from '../entities/emr.doc.type.entity';

@InputType()
export class EmrDocTypeQuery {
  @Field()
  ID?: string;

  @Field()
  TEXTNAME?: string;
}

@InputType()
export class EmrDocTypeInput {
  @Field()
  ID: string;

  @Field()
  TEXTNAME: string;

  @Field()
  PARENTID: string;
}

//文书操作接口
export interface Idoctype {
  //查询
  findAllText(): Promise<EmrDocTypeEntity[]>;

  findOneTextById(id: string): Promise<EmrDocTypeEntity>;

  findByName(textname: string): Promise<EmrDocTypeEntity[]>;

  //操作
  updateOne(doctype: EmrDocTypeInput): Promise<EmrDocTypeEntity>;

  addOne(doctype: EmrDocTypeInput): Promise<EmrDocTypeEntity>;

  deleteOne(id: string): Promise<boolean>;

  transactiontest(id: string): Promise<boolean>;
}
